package com.sas.web.panel.articles;

import org.apache.wicket.markup.html.form.TextField;
import org.apache.wicket.markup.html.panel.Panel;


public class ArticleInfoPanel extends Panel {

	/**
	 * 
	 */
	private static final long serialVersionUID = -6793824876429250729L;
	
	public ArticleInfoPanel(String id) {
		super(id);
		add(new TextField<String>("code").setRequired(true));
		add(new TextField<String>("name").setRequired(true));
		add(new TextField<String>("description").setRequired(true));
		add(new TextField<Double>("weight").setRequired(true));
		add(new TextField<Double>("netWeight").setRequired(true));
		add(new TextField<Double>("height").setRequired(true));
		add(new TextField<Double>("width").setRequired(true));
		add(new TextField<Double>("priceSell").setRequired(true));
	}
	
	public void setEnable(boolean bool) {
		get("code").setEnabled(bool);
		get("name").setEnabled(bool);
		get("description").setEnabled(bool);
		get("weight").setEnabled(bool);
		get("netWeight").setEnabled(bool);
		get("height").setEnabled(bool);
		get("width").setEnabled(bool);
		get("priceSell").setEnabled(bool);
	}

}
